home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Utilities / Converters / Convert_RTF / Source / FontEntry.h < prev    next >
Text File  |  1995-06-12  |  3KB  |  69 lines

  1. /***********************************************************************\
  2. Font Entry class for Convert RTF which converts between Mac and NeXT rtf formats.
  3. Copyright (C) 1993 David John Burrowes
  4.  
  5. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version.
  6.  
  7. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
  8.  
  9. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  10.  
  11. The author, David John Burrowes, can be reached at:
  12.     davidjohn@kira.net.netcom.com
  13.     David John Burrowes
  14.     1926 Ivy #10
  15.     San Mateo, CA 94403-1367
  16. \***********************************************************************/
  17.  
  18. /*
  19.     Class: FontEntry
  20.     Purpose:    When parsing an RTF file, it turns out that it would be nice to have a table of all the fonts listed in the RTF fonttbl block.  If one imagines a full table of font information to be in the form of a little 2D array, then this class corresponds to describing one row of that array.  Multiple instances of this class make up a table.
  21.     In short, this class is merely a glorified struct for tracking information about a 'font'.
  22.     It tracks the following information:
  23.         The font number (inited to 0)
  24.         An RTF token describing the font type (null object at first)
  25.         A CString containing the name of the font (empy string at first)
  26.         A count (intended for the number of times this font is used)  (initialized to 0)
  27.         A flag indicated whether characters in this font should be converted (default is no conversion)
  28.     In classic Mac misuse of terminology, then, this is really a type family entry.  oh well. 
  29. */
  30.  
  31. #import "ResultObject.h"
  32. //
  33. //    Values indicating different ways one can convert the font (more should be avail)
  34. //
  35. typedef enum
  36. {
  37.     NoConversion,
  38.     FullConversion,
  39. }
  40. ConvertTypes;
  41.  
  42.  
  43. @interface  FontEntry:ResultObject
  44. {
  45.     Integer            FontNumber;
  46.     Instance            FontType;    // The RTF spec calls this the font family !!
  47.     CString            FontName;
  48.     Integer            Count;
  49.     ConvertTypes    Convert;
  50. }
  51.  
  52. - init;    
  53. - free;
  54. - IncrementCount;
  55. - DecrementCount;
  56. - (Integer) GetCount;
  57. - SetCount: (Integer) NewCount;
  58. - SetNumber: (Integer) NewNumber;
  59. - (Integer) GetNumber;
  60. - SetFontType: theType;
  61. - (Instance) GetFontType;
  62. - SetConversion: (ConvertTypes) newConvert;
  63. - (ConvertTypes) GetConversion;
  64. - SetName: (CString) TheName;
  65. - (CString) GetName;
  66. - AppendToName: (CString) TheName;
  67. - PrepName;
  68. @end
  69.